package com.sg.hms.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.sg.hms.Service.XianshiApplicationService;
import com.sg.hms.ServiceImpl.XianshiApplicationServiceImpl;
/**
 * 
 * @author 廖彦
 *
 */
public class DepartmentNeedManageController extends HttpServlet{
	XianshiApplicationService xianshiapp = new XianshiApplicationServiceImpl();
     @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    	// TODO Auto-generated method stub
    	doPost(req, resp);
    }
     @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    	// TODO Auto-generated method stub
    	    HttpSession   session = req.getSession();
    		String hqname = xianshiapp.findElName();//找到提交申请的后勤主管的名字
     		session.setAttribute("hqname", hqname); //把后勤主管的名字放入session中
    	req.getRequestDispatcher("page/departmentneed.jsp").forward(req, resp);
    }
}
